package com.janj.dao;

import com.janj.bean.Hero;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface HeroMapper {
    //查询所有信息
     @Select("SELECT * FROM hero")
    public  abstract List<Hero> selectAll();


   //修改功能
   @Update("UPDATE hero SET nice = #{nice} WHERE id = #{id}")
   public abstract Integer updateHeroValue(Hero newHero);

   //删除功能
    @Delete("DELETE FROM hero WHERE id = #{id}")
    public abstract Integer deleteHeroValue(Hero newHero);
}
